package com.basin.micro.uplaod.pojo.enums;

/**
 * @author: Sam ZHONG | sammy1997@aliyun.com
 */
public enum ErrorTips {
    UPLOAD_FAILED("文件上传失败", "文件[%s]上传失败，原因: %s"),
    FILE_NULL("文件对象为空", "上传文件对象为空");
    public final String label;
    public final String template;

    ErrorTips(String label, String template) {
        this.label = label;
        this.template = template;
    }

    public String generate(String... args) {
        // 填充占位符
        return String.format(this.template, args);
    }
}
